import java.util.Arrays;

public class Unigram 
{
    
   

    @Override
    public int hashCode() {
	final int prime = 31;
	int result = 1;
	result = prime * result + Arrays.hashCode(unigramArr);
	return result;
    }

    @Override
    public boolean equals(Object obj) {
	if (this == obj)
	    return true;
	if (obj == null)
	    return false;
	if (getClass() != obj.getClass())
	    return false;
	Unigram other = (Unigram) obj;
	if (!Arrays.equals(unigramArr, other.unigramArr))
	    return false;
	return true;
    }

    private String[] unigramArr;
    
    private Unigram(String pos1)
    {
	unigramArr = new String[1];
	unigramArr[0]= pos1;
    }
    
    public static Unigram newUnigram(String pos1)
    {
	Unigram newUnigram = new Unigram(pos1);
	return newUnigram;
    }
    
    public String getPOS1()
    {
	return unigramArr[0];
    }
    
    public String[] getUnigram()
    {
	
	return this.unigramArr;
    }

    public String toString()
    {
	String output = "POS 1 is: " + getPOS1();
	return output;
    }
    
}
